import { createRouter, createWebHistory } from 'vue-router'
const routerHistory = createWebHistory()
const router = createRouter({
    history: routerHistory,
    routes: [      
        {
            path:"/",
            name:"login",
            component:()=>import("../views/login.vue"),
            meta:{title:"发现"},
        },
        {
            path:"/home",
            name:"index",
            component:()=>import("../views/main.vue"),
            meta:{title:"系统首页"},
            redirect:"/home/index",
            children:[
                {
                    path:"/home/index",
                    name:"index",
                    component:()=>import("../views/index.vue"),
                    meta:{title:"系统首页"},
                },
                {
                    path:"/home/host",
                    name:"host",
                    component:()=>import("../views/host.vue"),
                    meta:{title:"主机管里"},
                },
                {
                    path:"/home/monitor",
                    name:"monitor",
                    component:()=>import("../views/monitor.vue"),
                    meta:{title:"主机管里"},
                },
                {
                    path:"/home/alarm",
                    name:"alarm",
                    component:()=>import("../views/alarm.vue"),
                    meta:{title:"主机管里"},
                },
                {
                    path:"/home/about",
                    name:"about",
                    component:()=>import("../views/about.vue"),
                    meta:{title:"关于"},
                },
                {
                    path:"/home/setting",
                    name:"setting",
                    component:()=>import("../views/setting.vue"),
                    meta:{title:"关于"},
                },
                {
                    path:"/home/message",
                    name:"message",
                    component:()=>import("../views/message.vue"),
                    meta:{title:"关于"},
                },
            ]
        },
        

        
    ]
})
export default router